#{extends 'main.html' /}
#{set title:'TMtest' /}

<div id="article" >
    <div id="article2">
    
    
    
        For start testing open this pages:<br/><br/>
        <br/>
        <a id='tm'  target="_blank" class='frontBtn' href="@{Application.client()}">Client</a> <br/>
        <br/>
        <a id='tm'  target="_blank" class='frontBtn' href="@{Application.provider()}">Provider</a> <br/>
    
</div>
    <!-- <h2>Choose test object:</h2>
    <p>
        <button class="frontBtn" id="client">Client</button>
    </p>
    <div id="clientC">
        #{form @client()}
            <label>Write coordinates of client:</label><br/>
            <label>latitude:</label><br/>
            <input id="c_lat" name="c_lat"/><br/>
            <label>longitude:</label><br/>
            <input id="c_long" name="c_long"/><br/>
            
            <button id='crtClient' class="but2">Save</button>
        #{/form}
    </div>
    <p>
        <button class="frontBtn" id="provider">Provider</button>
    </p>
    <div id="providerC">
        #{form @provider()}
            <label>Write coordinates of provider:</label><br/>
            <label>latitude:</label><br/>
            <input id="p_lat" name="p_lat"/><br/>
            <label>longitude:</label><br/>
            <input id="p_long" name="p_long"/> <br/>
            
            <input type="submit" id="crtProvider" class="but2" value="Save"/>
        #{/form}
    </div> -->
</div>
<script>

    $('#client').click(function(p){
        document.getElementById('client').style.display = "none";
        document.getElementById('provider').style.display = "none";
        document.getElementById('clientC').style.display = "inline";
	});
    $('#provider').click(function(p){
        document.getElementById('client').style.display = "none";
        document.getElementById('provider').style.display = "none";
        document.getElementById('providerC').style.display = "inline";
	});
    $('#crtClient').click(function(p){
        c_lat = $('#c_lat').val();
        c_long = $('#c_long').val();
        if((c_lat=='')&&(c_long=='')){
            alert('You do not write coordinates');
            return false;
        }
    });
    $('#crtProvider').click(function(p){
        p_lat = $('#p_lat').val();
        p_long = $('#p_long').val();
        if((p_lat=='')&&(p_long=='')){
            alert('You do not write coordinates');
            return false;
        }
    });
</script>